package com.jc.ds.model;

import java.math.BigDecimal;
import java.util.Date;

/**
 * supplier
 * @author 
 */
public class Supplier extends BaseValueObject {
    /**
     * 主键 供应商ID
     */
    private Long id;

    /**
     * 供应商简称
     */
    private String simpleName;

    /**
     * 供应商全称
     */
    private String fullName;

    /**
     * 供应商名称首字母大写
     */
    private String initial;

    /**
     * 供应商编号
     */
    private String supplierSn;

    /**
     * 供应商类型，'cash 现购'，'credit 赊购','agent'代销,'consignment'一件代发
     */
    private String supplierType;

    /**
     * 供应商预存款
     */
    private BigDecimal advanceAmount;

    /**
     * 账期天数
     */
    private Integer paymentDays;

    /**
     * 结算期
     */
    private Integer settlementDays;

    /**
     * 预计到货周期（天）
     */
    private Integer deliveryDays;

    /**
     * 信用等级，1,2,3,4,5共五级，5为最高
     */
    private Integer credit;

    /**
     * 创建人
     */
    private String creator;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 最后修改人
     */
    private String editor;

    /**
     * 最后修改时间
     */
    private Date editTime;

    /**
     * 是否删除
     */
    private String isDelete;

    /**
     * 发票类型 general:普票 valuable:增票
     */
    private String invoiceType;

    /**
     * 税点
     */
    private Integer taxPoint;

    /**
     * 变更状态：wait：待确认；confirmed：已确认；cancelled：取消
     */
    private String status;

    /**
     * 审核人
     */
    private Integer confirmer;

    /**
     * 审核时间
     */
    private Long confirmTime;

    /**
     * 供应商系统基础URL
     */
    private String supplierSystemUrl;

    /**
     * 供应商APPKEY 用来对接供应商系统 非必填项
     */
    private String supplierAppKey;

    /**
     * 供应商secret 应用秘钥  用来对接供应商系统 非必填项
     */
    private String supplierSecret;

    /**
     * 该供应商产品是否自动推送到商城 0 不自动推送 1 自动推送
     */
    private Integer productAutoPush;

    /**
     * 该供应商订单是否自动推送到供应商系统 0 不自动推送 1 自动推送 如果需要自动推送 需要供应商API支持
     */
    private Integer orderAutoPush;

    /**
     * 扩展字段
     */
    private String extend1;

    /**
     * 扩展字段
     */
    private String extend2;

    /**
     * 扩展字段
     */
    private String extend3;

    /**
     * 扩展字段
     */
    private String extend4;

    /**
     * 扩展字段
     */
    private String extend5;

    private String orderStr = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSimpleName() {
        return simpleName;
    }

    public void setSimpleName(String simpleName) {
        this.simpleName = simpleName;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public String getInitial() {
        return initial;
    }

    public void setInitial(String initial) {
        this.initial = initial;
    }

    public String getSupplierSn() {
        return supplierSn;
    }

    public void setSupplierSn(String supplierSn) {
        this.supplierSn = supplierSn;
    }

    public String getSupplierType() {
        return supplierType;
    }

    public void setSupplierType(String supplierType) {
        this.supplierType = supplierType;
    }

    public BigDecimal getAdvanceAmount() {
        return advanceAmount;
    }

    public void setAdvanceAmount(BigDecimal advanceAmount) {
        this.advanceAmount = advanceAmount;
    }

    public Integer getPaymentDays() {
        return paymentDays;
    }

    public void setPaymentDays(Integer paymentDays) {
        this.paymentDays = paymentDays;
    }

    public Integer getSettlementDays() {
        return settlementDays;
    }

    public void setSettlementDays(Integer settlementDays) {
        this.settlementDays = settlementDays;
    }

    public Integer getDeliveryDays() {
        return deliveryDays;
    }

    public void setDeliveryDays(Integer deliveryDays) {
        this.deliveryDays = deliveryDays;
    }

    public Integer getCredit() {
        return credit;
    }

    public void setCredit(Integer credit) {
        this.credit = credit;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getEditor() {
        return editor;
    }

    public void setEditor(String editor) {
        this.editor = editor;
    }

    public Date getEditTime() {
        return editTime;
    }

    public void setEditTime(Date editTime) {
        this.editTime = editTime;
    }

    public String getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(String isDelete) {
        this.isDelete = isDelete;
    }

    public String getInvoiceType() {
        return invoiceType;
    }

    public void setInvoiceType(String invoiceType) {
        this.invoiceType = invoiceType;
    }

    public Integer getTaxPoint() {
        return taxPoint;
    }

    public void setTaxPoint(Integer taxPoint) {
        this.taxPoint = taxPoint;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getConfirmer() {
        return confirmer;
    }

    public void setConfirmer(Integer confirmer) {
        this.confirmer = confirmer;
    }

    public Long getConfirmTime() {
        return confirmTime;
    }

    public void setConfirmTime(Long confirmTime) {
        this.confirmTime = confirmTime;
    }

    public String getSupplierSystemUrl() {
        return supplierSystemUrl;
    }

    public void setSupplierSystemUrl(String supplierSystemUrl) {
        this.supplierSystemUrl = supplierSystemUrl;
    }

    public String getSupplierAppKey() {
        return supplierAppKey;
    }

    public void setSupplierAppKey(String supplierAppKey) {
        this.supplierAppKey = supplierAppKey;
    }

    public String getSupplierSecret() {
        return supplierSecret;
    }

    public void setSupplierSecret(String supplierSecret) {
        this.supplierSecret = supplierSecret;
    }

    public Integer getProductAutoPush() {
        return productAutoPush;
    }

    public void setProductAutoPush(Integer productAutoPush) {
        this.productAutoPush = productAutoPush;
    }

    public Integer getOrderAutoPush() {
        return orderAutoPush;
    }

    public void setOrderAutoPush(Integer orderAutoPush) {
        this.orderAutoPush = orderAutoPush;
    }

    public String getExtend1() {
        return extend1;
    }

    public void setExtend1(String extend1) {
        this.extend1 = extend1;
    }

    public String getExtend2() {
        return extend2;
    }

    public void setExtend2(String extend2) {
        this.extend2 = extend2;
    }

    public String getExtend3() {
        return extend3;
    }

    public void setExtend3(String extend3) {
        this.extend3 = extend3;
    }

    public String getExtend4() {
        return extend4;
    }

    public void setExtend4(String extend4) {
        this.extend4 = extend4;
    }

    public String getExtend5() {
        return extend5;
    }

    public void setExtend5(String extend5) {
        this.extend5 = extend5;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderBySimpleName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by simple_name asc";
            }else{
                this.orderStr = this.orderStr + ",simple_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by simple_name desc";
            }else{
                this.orderStr = this.orderStr + ",simple_name desc";
            }
        }
    }

    public void orderByFullName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by full_name asc";
            }else{
                this.orderStr = this.orderStr + ",full_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by full_name desc";
            }else{
                this.orderStr = this.orderStr + ",full_name desc";
            }
        }
    }

    public void orderByInitial(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by initial asc";
            }else{
                this.orderStr = this.orderStr + ",initial asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by initial desc";
            }else{
                this.orderStr = this.orderStr + ",initial desc";
            }
        }
    }

    public void orderBySupplierSn(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by supplier_sn asc";
            }else{
                this.orderStr = this.orderStr + ",supplier_sn asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by supplier_sn desc";
            }else{
                this.orderStr = this.orderStr + ",supplier_sn desc";
            }
        }
    }

    public void orderBySupplierType(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by supplier_type asc";
            }else{
                this.orderStr = this.orderStr + ",supplier_type asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by supplier_type desc";
            }else{
                this.orderStr = this.orderStr + ",supplier_type desc";
            }
        }
    }

    public void orderByAdvanceAmount(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by advance_amount asc";
            }else{
                this.orderStr = this.orderStr + ",advance_amount asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by advance_amount desc";
            }else{
                this.orderStr = this.orderStr + ",advance_amount desc";
            }
        }
    }

    public void orderByPaymentDays(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by payment_days asc";
            }else{
                this.orderStr = this.orderStr + ",payment_days asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by payment_days desc";
            }else{
                this.orderStr = this.orderStr + ",payment_days desc";
            }
        }
    }

    public void orderBySettlementDays(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by settlement_days asc";
            }else{
                this.orderStr = this.orderStr + ",settlement_days asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by settlement_days desc";
            }else{
                this.orderStr = this.orderStr + ",settlement_days desc";
            }
        }
    }

    public void orderByDeliveryDays(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by delivery_days asc";
            }else{
                this.orderStr = this.orderStr + ",delivery_days asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by delivery_days desc";
            }else{
                this.orderStr = this.orderStr + ",delivery_days desc";
            }
        }
    }

    public void orderByCredit(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by credit asc";
            }else{
                this.orderStr = this.orderStr + ",credit asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by credit desc";
            }else{
                this.orderStr = this.orderStr + ",credit desc";
            }
        }
    }

    public void orderByCreator(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by creator asc";
            }else{
                this.orderStr = this.orderStr + ",creator asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by creator desc";
            }else{
                this.orderStr = this.orderStr + ",creator desc";
            }
        }
    }

    public void orderByCreateTime(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by create_time asc";
            }else{
                this.orderStr = this.orderStr + ",create_time asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by create_time desc";
            }else{
                this.orderStr = this.orderStr + ",create_time desc";
            }
        }
    }

    public void orderByEditor(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by editor asc";
            }else{
                this.orderStr = this.orderStr + ",editor asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by editor desc";
            }else{
                this.orderStr = this.orderStr + ",editor desc";
            }
        }
    }

    public void orderByEditTime(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by edit_time asc";
            }else{
                this.orderStr = this.orderStr + ",edit_time asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by edit_time desc";
            }else{
                this.orderStr = this.orderStr + ",edit_time desc";
            }
        }
    }

    public void orderByIsDelete(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by is_delete asc";
            }else{
                this.orderStr = this.orderStr + ",is_delete asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by is_delete desc";
            }else{
                this.orderStr = this.orderStr + ",is_delete desc";
            }
        }
    }

    public void orderByInvoiceType(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by invoice_type asc";
            }else{
                this.orderStr = this.orderStr + ",invoice_type asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by invoice_type desc";
            }else{
                this.orderStr = this.orderStr + ",invoice_type desc";
            }
        }
    }

    public void orderByTaxPoint(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by tax_point asc";
            }else{
                this.orderStr = this.orderStr + ",tax_point asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by tax_point desc";
            }else{
                this.orderStr = this.orderStr + ",tax_point desc";
            }
        }
    }

    public void orderByStatus(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by status asc";
            }else{
                this.orderStr = this.orderStr + ",status asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by status desc";
            }else{
                this.orderStr = this.orderStr + ",status desc";
            }
        }
    }

    public void orderByConfirmer(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by confirmer asc";
            }else{
                this.orderStr = this.orderStr + ",confirmer asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by confirmer desc";
            }else{
                this.orderStr = this.orderStr + ",confirmer desc";
            }
        }
    }

    public void orderByConfirmTime(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by confirm_time asc";
            }else{
                this.orderStr = this.orderStr + ",confirm_time asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by confirm_time desc";
            }else{
                this.orderStr = this.orderStr + ",confirm_time desc";
            }
        }
    }

    public void orderBySupplierSystemUrl(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by supplier_system_url asc";
            }else{
                this.orderStr = this.orderStr + ",supplier_system_url asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by supplier_system_url desc";
            }else{
                this.orderStr = this.orderStr + ",supplier_system_url desc";
            }
        }
    }

    public void orderBySupplierAppKey(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by supplier_app_key asc";
            }else{
                this.orderStr = this.orderStr + ",supplier_app_key asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by supplier_app_key desc";
            }else{
                this.orderStr = this.orderStr + ",supplier_app_key desc";
            }
        }
    }

    public void orderBySupplierSecret(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by supplier_secret asc";
            }else{
                this.orderStr = this.orderStr + ",supplier_secret asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by supplier_secret desc";
            }else{
                this.orderStr = this.orderStr + ",supplier_secret desc";
            }
        }
    }

    public void orderByProductAutoPush(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by product_auto_push asc";
            }else{
                this.orderStr = this.orderStr + ",product_auto_push asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by product_auto_push desc";
            }else{
                this.orderStr = this.orderStr + ",product_auto_push desc";
            }
        }
    }

    public void orderByOrderAutoPush(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by order_auto_push asc";
            }else{
                this.orderStr = this.orderStr + ",order_auto_push asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by order_auto_push desc";
            }else{
                this.orderStr = this.orderStr + ",order_auto_push desc";
            }
        }
    }

    public void orderByExtend1(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by extend1 asc";
            }else{
                this.orderStr = this.orderStr + ",extend1 asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by extend1 desc";
            }else{
                this.orderStr = this.orderStr + ",extend1 desc";
            }
        }
    }

    public void orderByExtend2(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by extend2 asc";
            }else{
                this.orderStr = this.orderStr + ",extend2 asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by extend2 desc";
            }else{
                this.orderStr = this.orderStr + ",extend2 desc";
            }
        }
    }

    public void orderByExtend3(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by extend3 asc";
            }else{
                this.orderStr = this.orderStr + ",extend3 asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by extend3 desc";
            }else{
                this.orderStr = this.orderStr + ",extend3 desc";
            }
        }
    }

    public void orderByExtend4(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by extend4 asc";
            }else{
                this.orderStr = this.orderStr + ",extend4 asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by extend4 desc";
            }else{
                this.orderStr = this.orderStr + ",extend4 desc";
            }
        }
    }

    public void orderByExtend5(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by extend5 asc";
            }else{
                this.orderStr = this.orderStr + ",extend5 asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by extend5 desc";
            }else{
                this.orderStr = this.orderStr + ",extend5 desc";
            }
        }
    }
}